﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [{name: '登录', path: '/user/login', component: './User/Login'}],
  },
  {path: '/welcome', name: '欢迎页', access: 'canAdmin', icon: 'smile', component: './Panel/ProductionLinePanel'},
  // {path: '/welcome', name: '欢迎页', icon: 'smile', component: './Welcome'},
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin'
  },
  {path: '/user/editPassword', component: './EditUserPassword'},
  {
    name: '产线月度规划产能信息配置',
    icon: 'table',
    access: 'canPlan',
    path: '/monthly-planning',
    component: './MonthlyPlanning'
  },
  {
    name: '产线每日产能信息配置', icon: 'Schedule', access: 'canPlan', path: '/daily-planning',
    routes: [
      {path: '/daily-planning/attendance', name: '日出勤基础数据配置', component: './DailyPlanning/Attendance'},
      {path: '/daily-planning/capacity', name: '日计划产能和排产配置', component: './DailyPlanning/Capacity/index.tsx'}
    ]
  },
  {name: '线别与工序配置', icon: 'table', access: 'canQuality', path: '/display-step', component: './DisplayStep'},

  {
    name: '良率补偿配置', icon: 'Schedule', path: '/yield-offset', access: 'canQuality',
    routes: [
      {
        name: '产品良率补偿配置',
        icon: 'table',
        path: '/yield-offset/product',
        component: './YieldOffset/ProductYieldOffset'
      },
      {name: '工序良率补偿配置', icon: 'table', path: '/yield-offset/step', component: './YieldOffset/StepYieldOffset'},
    ]
  },
  {
    name: '仪表盘', icon: 'Schedule', path: '/panel',
    hideInMenu: true,
    routes: [
      {
        name: '产线看板',
        icon: 'table',
        path: '/panel/production-line',
        component: './Panel/ProductionLinePanel'
      },
    ],
  },
  {
    name: '工单维护配置',
    icon: 'table',
    access: 'canQuality',
    path: '/worksheet-preserve',
    component: './WorkSheetPreserve'
  },
  {
    name: '节假日配置',
    icon: 'coffee',
    access: 'canQMS',
    path: '/holiday-qms',
    component: './HolidayQMS'
  },
  {path: '/', redirect: '/welcome'},
  {path: '*', layout: false, component: './404'},
];

